<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./../template/userTemplate.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui">

    <ui:define name="title">
           
    </ui:define>

    <ui:define name="head">
    </ui:define>

    <ui:define name="content1">
        <div class="page-header">
            <h3>Login</h3>


        </div>
        
        <div class="col-6 col-sm-6 col-lg-6 alert alert-info">
            <h:form id="f1">
                <div class="form-group">

                    <div class="input-group ">
                        <span class="input-group-addon">Username</span>
                        <h:inputText styleClass= "form-control"  value="#{login.username}" />
                    </div>
                </div>
                <div class="form-group">
                    <div class="input-group ">
                        <span class="input-group-addon">Password</span>
                        <h:inputSecret value="#{login.password}"  onfocus="" styleClass="form-control" />
                    </div>
                </div>
               
                <div class="form-group">
                    <div class="checkbox">
                        <label>
                            <h:selectBooleanCheckbox value="#{login.isRemember}" styleClass="checkbox-size" id="login-check" /><label for="login-check">Remember me</label>
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <div class="">
                        <!--                            <button type="button" class="btn btn-default">Login</button>-->
                        <h:commandButton action="#{login.dologin}"  value="Login" styleClass="btn btn-default"
                                         rendered="#{abstractUIBean.currentAccount == null}"/>
                        
                    </div>
                </div>
            </h:form>
            <h:panelGroup id="msg_error" layout="block" rendered="#{login.isError}" styleClass="alert alert-danger">
                #{login.msg_error}
            </h:panelGroup>
            <!--                <div class="alert alert-danger" >
                                Sorry! Your username/email and password doesnt match any account
                            </div>-->

        </div>
    
    </ui:define>

</ui:composition>
